<!Doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=0.8, minimal-ui">
		
		<meta name="author" content="XAS-712">
		
		<title>ESP8266 WiFi搞事工具</title>
		<link rel="stylesheet" href="style.css">
		<script src="js/functions.js"></script>
	</head>
	<body>
				<nav>
		<div onclick="alert('由GitHub.XAS-712汉化制作')">ESP8266无线搞事工具</div>
			<a href="apscan.html">无线接入点</a>
			<a href="stations.html">无线客户端</a>
			<a href="attack.html">搞事</a>
			<a href="settings.html">设置</a>
		</nav>
		
		<div class="container">
			<div class="row">
				<div class="col-12">
					
					<div id="error" class="hide"></div>
					
					<h1 class="header">搞事</h1>
					
					<p class="bold">选择的AP(s): <button onclick='cloneSelected()'>克隆选中接入点</button></p>
					<ul id="selectedAPs"></ul>
					
					<p class="bold">选择的客户端(s):</p>
					<ul id="selectedClients"></ul>
					
					<table></table>
					
					<label class="left">
						<input type="number" id="randomIntrvl" value="5" min="1" max="65000"/>秒
					</label>
					
					<button class="right" id="randomBtn" onclick="random()">随机开</button>
					
					<p class="clear">
						<br />
						<span class="red">信息: </span><span class="bold">开始搞事时你可能会失去连接。</span><br />
						在设置中将信道改为与选择的接入点相同可避免。
					</p>
					
					<hr />
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="ssid">SSID</label>
				</div>
				<div class="col-6">
					<input type="text" id="ssid" minlength="1" maxlength="32" placeholder="SSID" />
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="num">克隆数量</label>
				</div>
				<div class="col-6">
					<input type="number" id="num" min="0" max="48" value="0" />
				</div>
			</div>
			
			<div class="row">
				<div class="col-6">
					<label for="enc">加密</label>
				</div>
				<div class="col-6">
					<input type="checkbox" id="enc" name="enc" />
				</div>
			</div>
			
			<div class="row">
				<div class="col-12">
					
					<button class="button-primary col-4" onclick="addSSID()">+</button>
					
					<hr />
					
					<p class="left">SSIDs: <span id="ssidCounter">0/48</span></p>
					
					<div class="right">
						<button class="red" onclick="clearSSID()">清空</button> 
						<button onclick="randomSSID()">随机</button> 
					</div>

					<table></table>
					
					<button class="marginNull red" onclick="resetSSID()">复位</button> 
					<button class="marginNull button-primary right" onclick="saveSSID()">保存</button> 
					
					<p class="small" id="saved">已保存</p>
					
					<p>
						<br />
						<span class="bold">Deauth [解除认证攻击]:</span><br />
						向选中的客户端和接入点不断地发送解除验证和解除关联帧。<br />
						<br />
						<span class="bold">Beacon [信标帧洪水攻击]:</span><br />
						不断广播信标帧以在SSID列表中显示列表中的SSID<br />
						<br />
						<span class="bold">Probe-Request [请求报文洪水]:</span><br />
						不断向列表中的SSID发送请求帧
					</p>
					
					<div id="copyright">
						Version 1.6<br />
						
						
					</div>
					
					<script src="js/attack.js"></script>
					
				</div>
			</div>
		</div>
	</body>
</html>